
import { NzMessageService } from 'ng-zorro-antd';
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';
import { Observable } from 'rxjs/Observable';
import { LoginService } from '../../services/services';

/**登录验证的守护*/
@Injectable()
export class LoginResolve implements CanActivate {
    constructor(private loginService: LoginService) {}
    canActivate(next: ActivatedRouteSnapshot,state: RouterStateSnapshot): Promise<boolean>{
      return this.loginService.isLogined();
  	}
}
